﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BUS;
using DAO;


namespace FDeal.WUC
{
    public partial class WUCAdmin_ThongTin : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["isLogin"] == null || (bool)Session["isLogin"] == false)
                {
                    THONGTINTAIKHOAN thongtin = (THONGTINTAIKHOAN)Session["nguoiDung"];
                    if (thongtin == null|| thongtin.LOAITAIKHOAN != 2)
                    {
                        Response.Redirect("~/Default.aspx");
                    }
                }
            }
        }

        protected void DangXuat_Click(object sender, EventArgs e)
        {
            Session["isLogin"] = false;
            Session["nguoiDung"] = null;

            Response.Redirect("~/Default.aspx");
        }
    }
}